package com.todo.strategy.online.infrastructure.helper.es.entity;

import com.todo.component.es.entity.BaseESEntity;
import lombok.Data;
import org.dromara.easyes.annotation.HighLight;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.Settings;
import org.dromara.easyes.annotation.rely.Analyzer;
import org.dromara.easyes.annotation.rely.FieldType;

/**
 * @author azhebuxing
 * @date 2024/12/5 23:58
 * @description
 */
@Data
@Settings(shardsNum = 3, replicasNum = 2)
@IndexName(value = "basic_strategy")
public class BasicStrategyEntity extends BaseESEntity {

    /**
     * 标题
     */
    @IndexField(fieldType = FieldType.TEXT)
    private String title;
    /**
     * 推荐原因
     * 文档内容,指定了类型及存储/查询分词器
     */
    @HighLight(preTag = "<em style='color:red'>", postTag = "</em>")
    @IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_MAX_WORD)
    private String recommendDesc;
    /**
     * 攻略类型
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer strategyType;
    /**
     * 旅游天数类型：一天一夜、两天一夜等
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer travelTimeType;

    @IndexField(fieldType = FieldType.INTEGER)
    private Integer status;

    /**
     * 预计游玩时长/小时
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer timeCost;
    /**
     * 主图
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String mainImg;
    /**
     * 省份
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String province;
    /**
     * 城市
     */
    @IndexField(fieldType = FieldType.KEYWORD)
    private String city;
    /**
     * 预计花费/元
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer moneyCost;
    /**
     * 综合评分
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer score;
    /**
     * 复用数量
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer referenceCount;
    /**
     * 浏览量
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer viewCount;
    /**
     * 点赞量
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer likeCount;
    /**
     * 收藏量
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer collectCount;
    /**
     * 评论数
     */
    @IndexField(fieldType = FieldType.INTEGER)
    private Integer commentCount;

    @IndexField(fieldType = FieldType.INTEGER)
    private Integer isPlatform;
}
